package com.xzj.spring;

import com.xzj.spring.config.MyConfig;
import com.xzj.tomcat.Tomcat;

/**
 * @ProjectName: SpringDemo
 * @Package: com.xzj.spring
 * @ClassName: SpringApplication
 * @Author: xzj
 * @Description:
 * @Date: 2022/7/15 17:22
 * @Version: 1.0
 */
public class SpringApplication {
    public static void run(Class<MyConfig> myConfigClass, String[] args) {
        AnnotationApplicationContextConfig application = new AnnotationApplicationContextConfig(myConfigClass);
        Tomcat tomcat = (Tomcat)application.getBean("Tomcat");
        tomcat.init(application);
    }
}
